MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features
authorAquila Macedo <aquilamacedo@riseup.net>
Mon, 16 Mar 2026 04:09:29 +0000 (01:09 -0300)
committerLena Voytek <lena@voytek.dev>
Tue, 24 Mar 2026 13:26:38 +0000 (09:26 -0400)
commit2366227fb5211b918600906be4f6bacc79baacca
tree5b61fc2f85e8970123334abaa459f41e0485f091
parentd8054ef0d04d99d9c04ef90bedf1039bca34290a
MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features

collect_mysqld_features probes mariadbd with --datadir=., which can
point to the installed mysql-test tree.

During this probe, mariadbd may run the datadir case-sensitivity check
and try to create a *.lower-test file there. This is a bad fit when the
test suite is run from a read-only installed path (e.g. /usr/share/...).

Use $opt_vardir as the datadir for this probe instead, so it runs in a
writable location and avoids writes into the installed test tree.

This upstream change stemmed from discovering during AppArmor testing that the
mariadb-test-run is writing in the /usr/share/.. path:

    apparmor="DENIED" operation="mknod" ... name="/usr/share/mariadb/mariadb-test/mariadb-aa.lower-test" requested_mask="c"

Origin: https://github.com/MariaDB/server/commit/1ecc1d932a0d89d83c7487da6b34717f10a9b7f5.patch
Forwarded: https://github.com/MariaDB/server/pull/4813

Gbp-Pq: Name MDEV-39082-mysql-test-use-vardir-as-datadir-in-collect_my.patch
mysql-test/mariadb-test-run.pl